package com.changpay.zywy.mvp.presenter

import com.changpay.zywy.base.BasePresenter
import com.changpay.zywy.ext.ss
import com.changpay.zywy.mvp.contract.ShopContract
import com.changpay.zywy.mvp.model.ShopModel


/**
 * Created by chenxz on 2018/5/27.
 */
class ShopPresenter : BasePresenter<ShopContract.Model, ShopContract.View>(), ShopContract.Presenter {
    override fun getBanner() {
        mModel?.getBanner()?.ss(mModel, mView) {
            mView?.showBanner(it.result)
        }
    }

    override fun getShop(token: String) {
        mModel?.getShop(token)?.ss(mModel, mView) {
            mView?.showShopGoods(it.result)
        }
    }


    override fun createModel(): ShopContract.Model? = ShopModel()


}